package com.lqm.web.converter;

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;

/**
 * @program: CrowdFunding
 * @description
 * @author: lqm
 * @create: 2018-12-15 18:26
 */
@Component
public class DateConverter implements Converter<String, Timestamp> {

    @Override
    public Timestamp convert(String source) {
        Timestamp ts = Timestamp.valueOf(source);  // 2011-05-09 11:49:45.0
        return ts;
    }

}
